<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width-device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.css" />
<link rel="stylesheet" href="css/person_update.css" />
<link rel="shortcut icon" href="ico/logo.ico"/>
<title>无标题文档</title>
</head>

<body>
<?php  include 'action/session_check.php'; //登录判断  ?>
<!--定义头部区域，放导航和logo -->
<header>
<div class="logo"><img src="ico/logo.png" alt=""/>伴美科技</div>
<nav>
<a href="main.php#home">首页</a>
<a href="main.php#about-us">关于我们</a>
<a href="main.php#showcases">自营产品</a>
<a href="main.php#service">招聘信息</a>
<a href="main.php#team-intro">商务合作</a>
<a href="main.php#company-activities">公司动态</a>
	<!-- 获取用户头像开始 -->
<a>	
<form method="post" action="">
    <?php
	require_once("conn/conn_db.php");
	$sql = "select * from  user_info where u_name ='".$_SESSION[user]."'";
	$result = $conn->query($sql);//执行SQL语句
    //遍历查询结果的每一行
    while($row = $result->fetch_array()){
	     ?>
	<a href="person_center.php?u_id=<?php echo $row['u_id']; ?>"><img src='../<?php echo $row['u_header'];?>' style="border-radius: 50%; width: 36px; height: 36px; position: absolute; top: 20px; right: 38px;" alt="User"></a>
	<?php 
         }
         ?>
	</form>
	</a>
	<!-- 获取用户头像结束 -->
</nav>
	
<!--定义折叠按钮 屏幕缩小到 -->
<div class="burger">
    <div class="burger-line1"></div>
	<div class="burger-line2"></div>
	<div class="burger-line3"></div>
</div>	
</header>
<!--头部区域结束 -->
	
<div class="container_box">
	<table width="800px">
   <tr>
	<?php
	require_once("conn/conn_db.php");
	if($_GET["n_id"] != ""){
		$nid = $_GET["n_id"];
		$sql = "select * from news_info ni, news_type nt where ni.nt_id = nt.nt_id and ni.n_id =".$nid;
		$result = $conn -> query($sql);
		$row = $result -> fetch_array();
		
	?> 
	   <td>
	   <p>==><?php echo $row['nt_name']; ?></p>
	   </td>
		</tr>
		<tr>
	   <td align="center">
	   <h2 style="font-family:  SimSun; margin-top: 0px; margin-bottom: 0px; font-size: 35px"><?php echo $row['n_name'];  ?></h2>
	   </td>
		</tr>
		<tr>
		<td align="center">
			<p style="font-family:  SimSun; margin-top: 10px; ">发表日期：<?php echo $row['n_createtime']; ?>
				&nbsp;&nbsp;&nbsp;&nbsp;
			
			点击量：<?php echo $row['n_hits']; ?></p></td>
		</tr>
		<tr>
		<td>
			<p style="margin-top: 15px; margin-bottom: 10px; font-family: SimSun;">摘要：<?php echo $row['n_intro']; ?></p>
			</td>
		</tr>
		<tr>
		<td align="center">
			<img src="<?php echo $row["n_image"]; ?>" alt="" width="800px" height="auto" />
			</td>
		</tr>
		
		<tr >
		<td>
		<h1 style="font-size: 20px; font-weight: 300 ;font-family: SimSun; line-height: 30px;">&nbsp;&nbsp;<?php echo $row['n_contents']; ?></h1>
		</td>
		</tr>
		</table>
	<?php  }  ?>
	<br>
	<table>
	<tr>
		<td width="800px" align="center">
			<a href="contact.php">
		<input type="button" value="我要留言" style="height: 30px;
		width: 90px; border-radius: 5px; background: #f79f1f; color: white; border: 0px;"/></a>
		</td>
		</tr>
	</table>
	<table cellspacing="0">
	<tr>
	<td>
		<h2>留言板</h2>
		</td>
	</tr>
	<?php 
   //包含数据库连接文件 
   require_once("conn/conn_db.php"); 
  	   $sql = "select * from contact ";  //查询语句
  	   $result = $conn->query($sql); 
	   while($row = $result->fetch_array())   //遍历查询结果的每一行
  {
?>
	<tr>
	<td align="center"><p>用户</p></td>
	</tr>
 
<tr>
	<td style="text-align: center; background: #EFEFEF "><img src='../<?php echo $row['u_header'];?>' style="border-radius: 50%; width: 36px; height: 36px; " alt="=_=暂无评论~">
	<br>
	<?php echo $row['u_name']; ?>
	</td>
	<td style="background: #EFEFEF " width="500px" height="100px" align="center">
	<?php echo $row['contact_info']; ?>
	</td>
	<td style="background: #EFEFEF; width: 180px ">
	<?php echo $row['c_time']; ?>
	</td>
	</tr>	
		<?php }   ?>
	</table>
	</div>
	
<!-- 底部模块开始 -->	
	<footer>
    <div class="footer-menus">
	   <div class="contact-us">
		    <p class="menu-title">联系我们</p>
		    <p>地址：中国重庆市XX路XX商务中心XX楼</p>
		   　<p>电话：+86XXX XXXX XXXX</p>
		   　<p>传真：+86XXX　XXXX XXXX</p>
		  　 <p>电子邮箱：admin@163.com</p>
	   </div>
		<div class="service-menu footer-menu">
		  <p class="menu-title">服务概况</p>
		  <ul class="menu-items">
		     <li><a href="#">跨境电商</a></li>
			 <li><a href="#">供应商</a></li>
			 <li><a href="#">移动应用</a></li>
			 <li><a href="#">网页设计</a></li>
		  </ul>
		</div>
		<div class="service-menu footer-menu">
		  <p class="menu-title">跨境产品</p>
		  <ul class="menu-items">
		     <li><a href="#">美妆护肤</a></li>
			 <li><a href="#">家用电器</a></li>
			 <li><a href="#">健康零食</a></li>
			 <li><a href="#">生活用品</a></li>
		  </ul>
		</div>
		<div class="service-menu footer-menu">
		  <p class="menu-title">公司动态</p>
		  <ul class="menu-items">
		     <li><a href="#">信息公开</a></li>
			 <li><a href="#">最近新闻</a></li>
			 <li><a href="#">最新消息</a></li>
			 
		  </ul>
		</div>
		<div class="service-menu footer-menu">
		  <p class="menu-title">帮助与支持</p>
		  <ul class="menu-items">
		     <li><a href="#">帮助中心</a></li>
			 <li><a href="#">联系客服</a></li>
			 <li><a href="#">文档资源</a></li>
			
		  </ul>
		</div>
		<p class="icp-info">备案号信息</p>
		<p class="rights">
		      &copy;2022 伴美科技 - 有限责任公司官网 版权所有
		</p>
		

	</div>	
</footer>
<!-- 底部模块结束 -->	

</body>
</html>